blog-banner

Improved Backup and Restore capabilities in distributed database

Last edited on February 11, 2021

0 minute read

    CockroachDB is designed to deliver bulletproof resilience. But even the world’s safest boat needs to carry life jackets. The same principle applies to your data, which is why we’ve baked a breadth of Backup and Restore capabilities into CockroachDB.

    Moving Backup & Restore into the Free, Open Source Version of CockroachDBCopy Icon

    Since this blog was originally published there has been one massive change to our backup & restore functionality - we moved it into open source. This decision was influenced by the community of CockroachDB users who helped us understand that modern data intensive applications need more support than what we were providing with our single machine disaster recovery.

    For context, when we made the decision to create two versions of our backup and restore features (one core and one enterprise) there was not the same proliferance of data intensive applications in the open source market that needed to be supported across multiple machines. That is, of course, no longer the case. And we’re grateful to the community for communicating their needs with us. You made this an easy decision.

    Backup Data & Restore Data in a Resilient, Distributed DatabaseCopy Icon

    The responsibilities of backup and restore functionalities are different in a database that is designed to survive disaster (and is named after the “cockroach”). For example, isolated issues like small-scale node failures don’t require action on your part. In a resilient database like CockroachDB backups are for disaster recovery situations where a cluster has lost a majority of its nodes.

    In CockroachDB the distributed backup and restore features help the users quickly recover from coding accidents, they also add more protection for customer data, and they help applications stay in regulatory compliance with industry specific data regulations (through backup archival). You also may want to take regular backups to get point-in-time snapshots of your database.

    • Backup: CockroachDB’s Backup statement allows you to create full or incremental backups of your cluster’s schema and data that are consistent as of a given timestamp.

    • Restore: The Restore statement restores your clusters schemas and data from a backup stored on services such as AWS S3, Google Cloud Storage, NFS, or HTTP storage (you can restore a full cluster, databases, or tables).

    CockroachDB Backup & Restore TutorialCopy Icon

    In this video tutorial, Senior Product Manager Michael Wang goes through some improvements made to Backup and Restore that are intended to make the process faster, easier and more secure. In this tutorial, Michael gets into the command line to demonstrate some improvements we’ve made, and he takes the time to explain what CockroachDB is doing under the hood to make the developer experience more seamless. Here are some of the highlights from the tutorial:

    • An updated incremental backup UX

    • Introducing full cluster backup/restore

    • Increased speed with time bound iterators

    • Added security with encrypted backups

    As we mentioned above these Backup & Restore features became open source as of version 20.2. So you can start building on CockroachDB by clicking here to get a free 30-day trial. If you’d like to learn what other CockroachDB open source users are building you can ask them directly in our community slack channel.

    backup
    restore
    20.1
    disaster recover